package com.xinhe.web.entity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.math.BigDecimal;
import java.util.Date;

@Entity
@Table(name = "tb_weixin_trade_cp")
@ApiModel(description = "微信支付交易记录表，只有支付成功了才有记录")
public class WeixinTradeCp {
    @Id
    @ApiModelProperty("id")
    private Long id;
    @ApiModelProperty("'商户订单号,关联tb_adopted_tree_order表的id")
    private String outTradeNo;
    @ApiModelProperty("'微信支付系统生成的订单号")
    private String transactionId;
    @ApiModelProperty("交易类型，枚举值：\n" +
            "JSAPI：公众号支付\n" +
            "NATIVE：扫码支付\n" +
            "App：App支付\n" +
            "MICROPAY：付款码支付\n" +
            "MWEB：H5支付\n" +
            "FACEPAY：刷脸支付")
    private String tradeType;
    @ApiModelProperty("创建时间")
    private Date createTime;
    @ApiModelProperty("是否被移除 0否 1是")
    private Integer removed;
    @ApiModelProperty("支付金额，微信以分为单位。我们系统以元为单位")
    private Integer amount;
    @ApiModelProperty("交易状态，枚举值：\n" +
            "SUCCESS：支付成功\n" +
            "REFUND：转入退款\n" +
            "NOTPAY：未支付\n" +
            "CLOSED：已关闭\n" +
            "REVOKED：已撤销（付款码支付）\n" +
            "USERPAYING：用户支付中（付款码支付）\n" +
            "PAYERROR：支付失败(其他原因，如银行返回失败)")
    private String tradeState;
    @ApiModelProperty("'银行类型，采用字符串类型的银行标识")
    private String bankType;
    @ApiModelProperty("'请求参数")
    private String req;
    @ApiModelProperty("'响应结果")
    private String rsp;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getOutTradeNo() {
        return outTradeNo;
    }

    public void setOutTradeNo(String outTradeNo) {
        this.outTradeNo = outTradeNo;
    }

    public String getTransactionId() {
        return transactionId;
    }

    public void setTransactionId(String transactionId) {
        this.transactionId = transactionId;
    }

    public String getTradeType() {
        return tradeType;
    }

    public void setTradeType(String tradeType) {
        this.tradeType = tradeType;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Integer getRemoved() {
        return removed;
    }

    public void setRemoved(Integer removed) {
        this.removed = removed;
    }

    public Integer getAmount() {
        return amount;
    }

    public void setAmount(Integer amount) {
        this.amount = amount;
    }

    public String getTradeState() {
        return tradeState;
    }

    public void setTradeState(String tradeState) {
        this.tradeState = tradeState;
    }

    public String getBankType() {
        return bankType;
    }

    public void setBankType(String bankType) {
        this.bankType = bankType;
    }

    public String getReq() {
        return req;
    }

    public void setReq(String req) {
        this.req = req;
    }

    public String getRsp() {
        return rsp;
    }

    public void setRsp(String rsp) {
        this.rsp = rsp;
    }
}
